import 'package:color_dart/RgbaColor.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:im_flutter_sdk_example/components/labels/index.dart';
import 'package:im_flutter_sdk_example/utils/constants.dart';

class GroupItem extends StatelessWidget {
  const GroupItem({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      height: 175,
      margin: EdgeInsets.only(bottom: 7),
      child: Column(children: [
        Container(
             padding: EdgeInsets.only(left: 10,right: 10,top: 6),
          child:
              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
            Row(
              children: [
                SizedBox(
                  width: 28,
                  height: 28,
                  child: Image.asset(
                    'lib/assets/images/default_avatar.png',
                    fit: BoxFit.cover,
                  ),
                ),
                Container(
                    child: Text('云南国科智融科技发展有限公司',
                        style: TextStyle(
                            color: rgba(136, 135, 135, 1), fontSize: 14)),
                    margin: EdgeInsets.only(left: 10)),
              ],
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Container(
                    height: 22,
                    padding: EdgeInsets.symmetric(horizontal:6),
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(11),
                      border: Border.all(
                        color: rgba(25, 109, 236, 1),
                        width: 1,
                      ),
                    ),
                    child: Text('+ 关注',
                        style: TextStyle(
                            color: rgba(25, 109, 236, 1), fontSize: 12)),
                    margin: EdgeInsets.only(left: 3)),
              ],
            ),
          ]),
        ),
        Container(
          padding: EdgeInsets.fromLTRB(16, 18, 16, 13),
          height: 124,
          child: Row(
            children: [
              Expanded(
                child: Padding(
                  padding: const EdgeInsets.only(right: 13),
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text(
                        '基于BIM GIS的数字园区大基于BIM GIS的数字园',
                        style: mainTitleStyle,
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                      ),
                      Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: [
                            Row(
                              children: [
                                Container(
                                  padding:EdgeInsets.symmetric(horizontal:6,vertical: 2),
                                  decoration: BoxDecoration(
                                    borderRadius: BorderRadius.circular(2),
                                    border: Border.all(
                                      color: rgba(255, 109, 1, 1),
                                      width: 1,
                                    ),
                                  ),
                                  child: Text(
                                    '项目',
                                    style: TextStyle(
                                        color: rgba(235, 101, 13, 1),
                                        fontSize: 12,
                                        fontWeight: FontWeight.bold),
                                  ),
                                )
                              ],
                            ),
                            Row(
                              children: [
                                Padding(
                                  padding: EdgeInsets.only(left: 5),
                                  child: Text(
                                    '213浏览',
                                    style: TextStyle(
                                        color: rgba(191, 191, 191, 1),
                                        fontSize: 12),
                                  ),
                                ),
                              ],
                            ),
                          ])
                    ],
                  ),
                ),
              ),
              Stack(
                children: [
                  SizedBox(
                    width: 130,
                    height: 93,
                    child: Image.network(
                      'https://www.oss.innovationgloble.com/dev/activity/2020-06-10/9323173ed666465fa422e0b52ae75e88.jpg',
                      fit: BoxFit.cover,
                    ),
                  ),
                  Positioned(
                    right: 0,
                    top: 0,
                    child: LabelBaoMing(),
                  )
                ],
              ),
            ],
          ),
        ),
      ]),
    );
  }
}
